package com.ruoyi.partybuilding.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import com.easy.query.core.annotation.ColumnIgnore;
import com.easy.query.core.annotation.EasyWhereCondition;
import com.easy.query.core.annotation.Table;
import com.ruoyi.partybuilding.common.EQuery.*;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.*;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 积分类型对象 pb_score_type
 * 
 * @author he-liangliang@outlook.com
 * @date 2024-11-27
 */

@Table("pb_score_type")
@Data
public class ScoreType extends EQueryEntityLong
{
    private static final long serialVersionUID = 1L;


    /** 名称 ; */
    @ApiModelProperty(value = "名称")
    @EasyWhereCondition
    @Excel(name = "名称")
    @NotBlank(message = "名称错误")
    private String name;

    /** 0个人积分，1组织积分 ; */
    @ApiModelProperty(value = "0个人积分，1组织积分")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "0个人积分，1组织积分")
    @Min(value = 0,message = "积分类型错误")
    @Max(value = 1,message = "积分类型错误")
    @NotNull(message ="积分类型错误" )
    private Long type;

    /** 父ID ; */
    @ApiModelProperty(value = "父ID")
    @Excel(name = "父ID")
    private Long parentId;

    /** 级别,0分类，1题目 ; */
    @ApiModelProperty(value = "级别,0分类，1题目")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "级别,0分类，1题目")
    @Min(value = 0,message = "级别错误")
    @Max(value = 1,message = "级别错误")
    @NotNull(message ="级别错误" )
    private Long level;

    /** 子标题，暂不使用 ; */
    @ApiModelProperty(value = "子标题，暂不使用")
    @Excel(name = "子标题，暂不使用")
    private String subtitle;

    /** 0：减分，1：加分 ; */
    @ApiModelProperty(value = "0：减分，1：加分")
    @Excel(name = "0：减分，1：加分")
    private Long bouns;

    /** 基础分 ; */
    @ApiModelProperty(value = "基础分")
    @Excel(name = "基础分")
    private BigDecimal basisScore;

    /** 最高分 ; */
    @ApiModelProperty(value = "最高分")
    @Excel(name = "最高分")
    private BigDecimal highScore;

    /** 0：月度；1：季度；2：半年 3：年度 ; */
    @ApiModelProperty(value = "0：月度；1：季度；2：半年 3：年度")
    @Excel(name = "0：月度；1：季度；2：半年 3：年度")
    private Long cycle;

    /** 状态,0停用1启用 ; */
    @ApiModelProperty(value = "状态,0停用1启用")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Min(value = 0,message = "状态错误")
    @Max(value = 1,message = "状态错误")
    @Excel(name = "状态,0停用1启用")
    private Long status;

    /** 0申报积分，1:自动积分 ; */
    @ApiModelProperty(value = "0申报积分，1:自动积分",notes = "当前只有申报积分")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "0申报积分，1:自动积分")
    private Long wayType;

    /** 每日积分上限 ; */
    @ApiModelProperty(value = "每日积分上限")
    @Excel(name = "每日积分上限")
    private BigDecimal scoreDayUp;

    @ApiModelProperty(value = "排序")
    Integer sort;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("type", getType())
            .append("parentId", getParentId())
            .append("level", getLevel())
            .append("subtitle", getSubtitle())
            .append("bouns", getBouns())
            .append("basisScore", getBasisScore())
            .append("highScore", getHighScore())
            .append("cycle", getCycle())
            .append("status", getStatus())
            .append("wayType", getWayType())
            .append("scoreDayUp", getScoreDayUp())
            .toString();
    }
}
